package com.zn.opit.quartzdemo.exception;

import lombok.Getter;

@Getter
public enum QuartzDemoExceptionTypes implements ExtExceptionInfo {

    UNKNOWN_EXP("UNKNOWN_EXP", "未知异常"),

    CLASS_NOT_FOUND("CLASS_NOT_FOUND", "类不存在"),
    CRON_EXP_NOT_CORRECT("CRON_EXP_NOT_CORRECT", "正则表达式不正确"),

    JOB_NOT_EXISTS("JOB_NOT_EXISTS", "定时任务不存在"),
    JOB_CREATE_FAILED("JOB_CREATE_FAILED", "定时任务创建失败"),
    JOB_TRIGGER_FAILED("JOB_TRIGGER_FAILED", "定时任务触发失败"),
    JOB_MODIFY_FAILED("JOB_MODIFY_FAILED", "定时任务修改失败"),
    JOB_PAUSE_FAILED("JOB_PAUSE_FAILED", "定时任务暂停失败"),
    JOB_RESUME_FAILED("JOB_RESUME_FAILED", "定时任务恢复失败"),
    JOB_GET_FAILED("JOB_GET_FAILED", "定时任务获取失败"),
    JOB_DEL_FAILED("JOB_DEL_FAILED", "定时任务删除失败"),
    ;

    final String code;
    final String msg;

    QuartzDemoExceptionTypes(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
